package com.ruoyi.system.service;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.vo.HfuPayResultVo;
import com.ruoyi.system.domain.DyOrder;
import com.ruoyi.system.domain.bo.DyIndexBo;
import com.ruoyi.system.domain.bo.DyOrderGoodsBo;
import com.ruoyi.system.domain.vo.DyOrderSumVo;
import com.ruoyi.system.domain.vo.DyOrderVo;
import com.ruoyi.system.domain.bo.DyOrderBo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.system.domain.vo.OrderIndexCompanySumVo;
import com.ruoyi.system.domain.vo.OrderIndexIncomeSumVo;
import com.ruoyi.system.vo.AlipayResultVo;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.List;

/**
 * 订单Service接口
 *
 * @author ruoyi
 * @date 2024-06-20
 */
public interface IDyOrderService {

    /**
     * 查询订单
     */
    DyOrderVo queryById(Long id);

    /**
     * 查询订单列表
     */
    TableDataInfo<DyOrderVo> queryPageList(DyOrderBo bo, PageQuery pageQuery,LoginUser loginUser);

    /**
     * 查询订单列表
     */
    List<DyOrderVo> queryList(DyOrderBo bo);

    /**
     * 新增订单
     */
    Boolean insertByBo(DyOrderBo bo);

    /**
     * 修改订单
     */
    Boolean updateByBo(DyOrderBo bo);

    /**
     * 校验并批量删除订单信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 订单数据统计
     */
    DyOrderSumVo getOrderSum(DyOrderBo bo, LoginUser loginUser);

    /**
     * 近15天收益情况
     */
    List<OrderIndexIncomeSumVo> getIndexIncomeSum(LoginUser loginUser);

    /**
     * 公司收益
     */
    List<OrderIndexCompanySumVo> getIndexCompanySum(DyIndexBo bo);

    String addOrderPayDemoTest(DyOrderGoodsBo bo);

    /**
     * 获取订单支付信息
     */
    String addOrderPay(DyOrderGoodsBo bo);

    String buildOrderNo();

    /**
     * 支付回调
     */
    String backOrderPay(String outTradeN, String tradeNo);

    int refundOrder(DyOrderBo bo);

    int resetCode(DyOrderBo bo);

    DyOrderVo getOrderInfoByTradeNo(DyOrderBo bo);

    String hfuPayResult(HttpServletRequest request);

    String getHfuPayStatus(HfuPayResultVo hfuPayResultVo);

    int complaintOrder(DyOrderBo bo);
}
